package com.c78.fz.controller;

import com.c78.fz.common.result.Result;
import com.c78.fz.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {
    @Resource
    UserService userService;

    @GetMapping("/getuser")
    public Result getUser() {
        return userService.getUser();
    }

    @PutMapping("/updpwd")
    public Result updPwd(String newPwd,String oldPwd) {
        return userService.updPwd(newPwd,oldPwd);
    }
}
